#include <bits/stdc++.h>
using namespace std;
#define int long long
void solve()
{
    int x,y;
    cin>>x>>y;
    int cnt=0;
    for(int i=1;i<=6;i++)
    {
        for(int j=1;j<=6;j++)
        {
            if(i+j>=x||abs(i-j)>=y)cnt++;
        }
    }
    double ans=(double)cnt/36;
    //cout<<ans;
    printf("%0.10lf",ans);
}
signed main()
{
    //ios::sync_with_stdio(false);
    //cin.tie(nullptr);
    int T=1;
    //cin>>T;
    while(T--)
    {
       solve();
    }
    return 0;
}